# transform.py ~ rotations, translations, and scalings
import pyscene, osg, math
scene = pyscene.pyscene()

cow1 = scene.readNodeFile("cow.osg")
mt1 = osg.MatrixTransform()
mt1.addChild(cow1)
mt1.postMult(
    osg.Matrixd.rotate(
        math.radians(180), 1, 0, 0 # upside-down cow is upside-down
    )
)
mt1.postMult( osg.Matrixd.translate(0, 0, 50) ) # and really high up
scene.addChild(mt1)

cow2 = scene.readNodeFile("cow.osg")
mt2 = osg.MatrixTransform()
mt2.addChild(cow2)
mt2.postMult( osg.Matrixd.scale(2, 2, 2) ) # big cow is big
scene.addChild(mt2)

scene.run()
